package com.potato.timetable.db.dao;

import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.potato.timetable.db.obj.ClassDO;
import com.potato.timetable.db.obj.TimeDO;

import java.util.List;


@Dao
public interface TimeDAO {

    @Insert
    void insert(TimeDO timeDO);

    @Query("SELECT * FROM time WHERE tid = :tid")
    TimeDO selectById(int tid);

    @Query("SELECT * FROM time")
    List<TimeDO> getAll();

    @Update
    void update(TimeDO timeDO);

    @Delete
    void delete(TimeDO timeDO);
}
